/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.springframework.beans.factory.xml;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.core.io.Resource;

/**
 *
 * @author lxz
 */
public class XmlBeanFactory extends DefaultListableBeanFactory {

    private final XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(this);
    
    public XmlBeanFactory(Resource resource) throws Exception {
        this(resource, null);
    }

    public XmlBeanFactory(Resource resource, BeanFactory beanFactory) throws Exception {
        this.reader.loadBeanDefinitions(resource);
    }

    public Object getBean(String name) throws Exception {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
